fix: 2 corrections on gbfs populate#1265
Merged
Merged
Conversation
…s based on changes in location.
cka-y
approved these changes
Jul 8, 2025
|
|
||
| # Exclude 'Location' from comparison because the DB values might have been changed in the | ||
| # python function that calculates the location. | ||
| columns_to_compare = [col for col in df_db_common.columns if col != "Location"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1242
Closes #1268
The two corrections are:
For deletion, this PR also setup cascade deletes on certain DB tables in the SQL schema. For example, id a GbfsFeed is deleted, the entry in gbfsversion table referring to this feed is also deleted. This prevent failing of the deletion because gbfsversion.feed_id cannot be null and is a foreign key to gbfsfeed.
Testing tips:
See test_populate_gbfs.py for the tests that have been done.
We miodified the way the DB is filled in the api integration tests to allow 2 .csv files to be loaded. This allowed to test loading a csv in a DB that is already populated, as was necessary for this PR.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything